A charger should be capable of providing a constant current to a load. For switching chargers, the constant current is achieved by limiting the bounds of a current flowing through an inductor of the switching charger. FIG. 1 schematically shows a prior art switching charger. As shown in FIG. 1, a control circuit 100 detects a voltage across a resistor Rsen coupled in series with an inductor L to generate a current sense signal. Based on the current sense signal, the control circuit 100 generates a control signal G1 to control the power switches M1 and M2, so as to regulate a current supplied to the load be a constant value. However, the resistor Rsen introduces power consumption. Meanwhile, it is difficult to integrate the resistor Rsen with the control circuit 100. Thus, two extra pins are needed to be coupled to the resistor Rsen.